// ---------------------------------------------------------------------------

#ifndef TwoGridModuleFormH
#define TwoGridModuleFormH
// ---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "BaseFrame.h"
#include "cxBarEditItem.hpp"
#include "cxClasses.hpp"
#include "cxDrawTextUtils.hpp"
#include "cxDropDownEdit.hpp"
#include "cxGraphics.hpp"
#include "cxLocalization.hpp"
#include "dxBar.hpp"
#include "dxBkgnd.hpp"
#include "dxPrnDev.hpp"
#include "dxPrnPg.hpp"
#include "dxPSCompsProvider.hpp"
#include "dxPSCore.hpp"
#include "dxPScxEditorProducers.hpp"
#include "dxPScxExtEditorProducers.hpp"
#include "dxPScxPageControlProducer.hpp"
#include "dxPSEdgePatterns.hpp"
#include "dxPSEngn.hpp"
#include "dxPSFillPatterns.hpp"
#include "dxPSGlbl.hpp"
#include "dxPSPDFExport.hpp"
#include "dxPSPDFExportCore.hpp"
#include "dxPSPrVwAdv.hpp"
#include "dxPSPrVwRibbon.hpp"
#include "dxPSPrVwStd.hpp"
#include "dxPSUtl.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinBlueprint.hpp"
#include "dxSkinCaramel.hpp"
#include "dxSkinCoffee.hpp"
#include "dxSkinDarkRoom.hpp"
#include "dxSkinDarkSide.hpp"
#include "dxSkinDevExpressDarkStyle.hpp"
#include "dxSkinDevExpressStyle.hpp"
#include "dxSkinFoggy.hpp"
#include "dxSkinGlassOceans.hpp"
#include "dxSkinHighContrast.hpp"
#include "dxSkiniMaginary.hpp"
#include "dxSkinLilian.hpp"
#include "dxSkinLiquidSky.hpp"
#include "dxSkinLondonLiquidSky.hpp"
#include "dxSkinMcSkin.hpp"
#include "dxSkinMoneyTwins.hpp"
#include "dxSkinOffice2007Black.hpp"
#include "dxSkinOffice2007Blue.hpp"
#include "dxSkinOffice2007Green.hpp"
#include "dxSkinOffice2007Pink.hpp"
#include "dxSkinOffice2007Silver.hpp"
#include "dxSkinOffice2010Black.hpp"
#include "dxSkinOffice2010Blue.hpp"
#include "dxSkinOffice2010Silver.hpp"
#include "dxSkinPumpkin.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinsDefaultPainters.hpp"
#include "dxSkinsdxBarPainter.hpp"
#include "dxSkinsdxRibbonPainter.hpp"
#include "dxSkinSeven.hpp"
#include "dxSkinSevenClassic.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSharpPlus.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinSpringTime.hpp"
#include "dxSkinStardust.hpp"
#include "dxSkinSummer2008.hpp"
#include "dxSkinTheAsphaltWorld.hpp"
#include "dxSkinValentine.hpp"
#include "dxSkinVS2010.hpp"
#include "dxSkinWhiteprint.hpp"
#include "dxSkinXmas2008Blue.hpp"
#include "dxWrap.hpp"
#include "Template2.h"
#include "TwoGridFrame.h"
#include <Dialogs.hpp>
#include <ImgList.hpp>

#include "FirstGridAddFrom.h"
#include "FirstGridUpdateFrom.h"
#include "SecondGridAddFrom.h"
#include "SecondGridUpdateFrom.h"

// ---------------------------------------------------------------------------
class TUTwoGridModuleForm : public TUTemplate2 {
__published: // IDE-managed Components
	void __fastcall FGridFrame1TableViewFocusedRecordChanged
		(TcxCustomGridTableView *Sender,
		TcxCustomGridRecord *APrevFocusedRecord,
		TcxCustomGridRecord *AFocusedRecord,
		bool ANewItemRecordFocusingChanged);
	void __fastcall FGridFrame1TableViewCellDblClick
		(TcxCustomGridTableView *Sender,
		TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
		TShiftState AShift, bool &AHandled);
	void __fastcall FGridFrame1TableViewKeyDown(TObject *Sender, WORD &Key,
		TShiftState Shift);
	void __fastcall FGridFrame2TableViewKeyDown(TObject *Sender, WORD &Key,
		TShiftState Shift);
	void __fastcall FGridFrame2TableViewCellDblClick
		(TcxCustomGridTableView *Sender,
		TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
		TShiftState AShift, bool &AHandled);
	void __fastcall FGridFrame1dxBarButton3Click(TObject *Sender);
	void __fastcall FGridFrame1dxBarButton5Click(TObject *Sender);
	void __fastcall FGridFrame1dxBarButton6Click(TObject *Sender);
	void __fastcall FGridFrame1dxBarButton7Click(TObject *Sender);
	void __fastcall FGridFrame2dxBarButton3Click(TObject *Sender);
	void __fastcall FGridFrame2dxBarButton5Click(TObject *Sender);
	void __fastcall FGridFrame2dxBarButton6Click(TObject *Sender);
	void __fastcall FGridFrame2dxBarButton7Click(TObject *Sender);

private: // User declarations
	bool FirstGridRecordChangedListen;

	TcxGridDBBandedTableView *FirstGridDBBandedTableView;

	TcxGridDBBandedTableView *SecondGridDBBandedTableView;

public: // User declarations
	__fastcall TUTwoGridModuleForm(TComponent* Owner);

	virtual void __fastcall RefreshFirstGrid();

	virtual void __fastcall RefreshSecondGrid();

	virtual void __fastcall AddFirstGrid();

	virtual void __fastcall AddSecondGrid();

	virtual void __fastcall EditFirstGrid();

	virtual void __fastcall EditSecondGrid();

	virtual void __fastcall DeleteFirstGrid();

	virtual void __fastcall DeleteSecondGrid();

	virtual void __fastcall CallBack(TServiceResult Result, String Tag);

	virtual void __fastcall AfterFormShow();

	virtual String __fastcall GetServiceName(int gridIndex = 0);

	virtual void __fastcall DataComboBoxChange(TObject *Sender);

	String FirstAddViewConfig;

	String FirstUpdateViewConfig;

	String SecondAddViewConfig;

	String SecondUpdateViewConfig;
};

// ---------------------------------------------------------------------------
extern PACKAGE TUTwoGridModuleForm *UTwoGridModuleForm;
// ---------------------------------------------------------------------------
#endif
